using System;
using System.Collections.Generic;
using System.Text;

namespace DependencyTest.Helpers 
{
    public sealed class Check
    {
        public int GetOsBuild()
        {
            return OperatingSystem.GetOsBuild();
        }
        public bool ForWindowsPowerShellOnVista()
        {
            return InstalledHotFixes.IsHotFixInstalled("928439");
        }
        public bool ForWindowsPowerShellExecutionPolicy(string desiredPolicy)
        {
            return RegistryHelper.IsValueAt(@"SOFTWARE\microsoft\powershell\1\shellids\Microsoft.PowerShell","ExecutionPolicy",desiredPolicy);
        }
        public bool ForSoftwarePacakge(string packageName)
        {
            return RegistryHelper.IsInKey(@"SOFTWARE\microsoft\Windows\CurrentVersion\Uninstall",
                "DisplayName", packageName);
        }
        public bool ForServerRole(string roleName)
        {
            return false;
        }
        public bool ForServerFeature(string featureName)
        {
            return false;
        }
        public bool ForOsBuildGreaterThan(int buildNumber)
        {
            int actualBuildNumber = OperatingSystem.GetOsBuild();
            return ( actualBuildNumber >= buildNumber);
        } 
    }
}
